package com.control;

import com.dbutil.UtilJdbc;
import com.entity.Push_work;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class PushWorkServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {


        req.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html;charset=UTF-8");

        UtilJdbc utilJdbc = new UtilJdbc();
        List<Push_work> list2=utilJdbc.PushedWork();


        req.setAttribute("list2",list2);
        req.getRequestDispatcher("/LoginPag/PushWork.jsp").forward(req,resp);
    }
}
